package com.zhiyou100.service;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.dao.StarDao;
import com.zhiyou100.model.Star;

@Service
public class StarServiceImpl implements StarService {
	@Autowired
	private StarDao starDao;

	@Override
	public void addByProjectIdAndUserId(Star star) {
		starDao.addByProjectIdAndUserId(star);

	}

	@Override
	public void deleteByProjectIdAndUserId(Integer projectId, Integer userId) {
		starDao.deleteByProjectIdAndUserId(projectId, userId);

	}

	@Override
	public ArrayList<Star> getByUserId(Star star) {
		ArrayList<Star> getStar = starDao.getByUserId(star);
		return getStar;
	}

}
